[PM-31128] Add reinit_user_crypto for mobile#1148
Conversation
🔍 SDK Breaking Change DetectionSDK Version:
Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1148 +/- ##
==========================================
+ Coverage 84.71% 84.77% +0.05%
==========================================
Files 448 449 +1
Lines 60343 60658 +315
==========================================
+ Hits 51122 51424 +302
- Misses 9221 9234 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| // The key store should not already have any keys initialized | ||
| if ctx.has_symmetric_key(SymmetricKeySlotId::User) | ||
| || ctx.has_private_key(PrivateKeySlotId::UserPrivateKey) | ||
| || ctx.has_signing_key(SigningKeySlotId::UserSigningKey) | ||
| { | ||
| return Err(EncryptionSettingsError::CryptoInitialization); | ||
| } |
There was a problem hiding this comment.
Moving this check upstream seem like the best approach. Open to other suggestions.
quexten
left a comment
There was a problem hiding this comment.
A few smaller nits, but more importantly the PIN migration is missing.
coroiu
left a comment
There was a problem hiding this comment.
Ping me when this is ready for merge :)
|
…init_user_crypto for mobile (bitwarden/sdk-internal#1148)



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-31128
📔 Objective
Add functionality to
CryptoClientto allow mobile applications that receive a newaccountCryptographicStateandV2UpgradeTokenfrom a userKey rotation upgrade sync to be able to reinit SDK's cryptography state.